package de.szut.bomberman.logic.field;

public class Field {
	public static final int LENGTH = 10;
	
	private Line[] vertical;
	private Line[] horizontal;
	
	public Field() {
		// Generates the basic field structure
		vertical = new Line[LENGTH];
		horizontal = new Line[LENGTH];
		
		// Generates the lines
		for (int index = 0; index != LENGTH; index ++) {
			vertical[index] = new Line();
			horizontal[index] = new Line();
		}
		
		// Generates the boxes and assigns them to the correct lines
		for (int xIndex = 0; xIndex != LENGTH; xIndex ++) {
			for (int yIndex = 0; yIndex != LENGTH; yIndex ++) {
				Box currentBox = new Box();
				horizontal[xIndex].addBox(currentBox);
				vertical[yIndex].addBox(currentBox);
			}
		}
		
	}

	public Line[] getVertical() {
		return vertical;
	}

	public void setVertical(Line[] vertical) {
		this.vertical = vertical;
	}

	public Line[] getHorizontal() {
		return horizontal;
	}

	public void setHorizontal(Line[] horizontal) {
		this.horizontal = horizontal;
	}
}
